Improving Determinization of Grammar Programs for Program Inversion

نویسندگان

  • Minami Niwa
  • Naoki Nishida
  • Masahiko Sakai
چکیده

The inversion method proposed by Glück and Kawabe uses grammar programs as intermediate results that comprise sequences of operations (data generation, matching, etc.). The determinization method used in the inversion method fails for a grammar program of which the collection of item sets causes a conflict even if there exists a deterministic program equivalent to the grammar program. In this paper, by ignoring shift/shift conflicts, we improve the determinization method so as to cover grammar programs causing shift/shift conflicts. Moreover, we propose a method to eliminate infeasible definitions from unfolded grammar programs and show that the method succeeds in determinizing some grammar programs for which the original method fails. By using the method as a post-process of the original inversion method, we make the original method strictly more powerful.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Grammar-Based Approach to Invertible Programs

Program inversion has many applications such as in the implementation of serialization/deserialization and in providing support for redo/undo, and has been studied by many researchers. However, little attention has been paid to two problems: how to characterize programs that are easy or hard to invert and whether, for each class of programs, efficient inverses can be obtained. In this paper, we...

متن کامل

Derivation of Deterministic Inverse Programs Based on LR Parsing

We present a method for automatic program inversion of functional programs based on methods of LR parsing. We formalize the transformation and illustrate it with the inversion of a program for runlength encoding. We solve one of the main problems of automatic program inversion—the elimination of nondeterminism—by viewing an inverse program as a context-free grammar and applying to it methods of...

متن کامل

The Effect of Multimedia-Based Instruction on Improving Iranian EFL Learners’ Grammar Knowledge and their Attitudes

Applying technologies has recently caused language education to undertake influential modifications. Hence, this study tried to investigate the impact of using technology in form of multimedia on improving grammar knowledge of Iranian high school students and also examined their attitudes toward multimedia-based mode of instruction. To do so, three intact classes of lower intermediate students ...

متن کامل

A Graph Grammar Approach for Durational Action Timed Automata Determinization

Durational Action Timed Automata (DATA) is a semantic model for expressing the behavior of real time systems where actions have durations. In this paper, we propose an approach for translating a DATA structure to a corresponding deterministic one. For this purpose, a meta-model of DATA model and a transformation grammar are defined. Programs are written in Python language and implemented under ...

متن کامل

Program Inversion for Tail Recursive Functions

Program inversion is a fundamental problem that has been addressed in many different programming settings and applications. In the context of term rewriting, several methods already exist for computing the inverse of an injective function. These methods, however, usually return non-terminating inverted functions when the considered function is tail recursive. In this paper, we propose a direct ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012